package br.eck.model.base.weapons;

import java.util.List;

import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;

import br.eck.model.game.SpaceShip;


/**
 * Representa uma arma da nave
 * 
 * @author Erick Zanardo
 * 
 */
public abstract class Weapon {
    private String name;
    private int keyToFire;
    private Image shootImage;
    private SpaceShip ship;
    private boolean ready;

    public Weapon(SpaceShip ship) throws SlickException {
        this.ship = ship;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getKeyToFire() {
        return keyToFire;
    }

    public void setKeyToFire(int keyToFire) {
        this.keyToFire = keyToFire;
    }

    public Image getShootImage() {
        return shootImage;
    }

    public void setShootImage(Image shootImage) {
        this.shootImage = shootImage;
    }

    public SpaceShip getShip() {
        return ship;
    }

    public void setShip(SpaceShip ship) {
        this.ship = ship;
    }

    public boolean isReady() {
        return ready;
    }

    public void setReady(boolean ready) {
        this.ready = ready;
    }

    public abstract List<Shoot> fire();
    public abstract void update(int timePassed);
}
